﻿using Library.OrmEnterpriseEntity.TableInfo;

namespace Library.OrmEnterpriseEntity.Factor {
	///<summary>
	/// Culteral resource string for Entity validation
	///</summary>
	public interface IStringResource {
		/// <summary>
		/// Column missing value, without determine value for column with ForceValue = true.
		/// </summary>
		/// <param name="column"></param>
		/// <param name="columnName"></param>
		/// <param name="columnValue"></param>
		/// <param name="tableName"></param>
		/// <returns></returns>
		string MissingColumnValue(DbColumn column, string columnName, object columnValue, string tableName);

		/// <summary>
		/// Column validate fail
		/// </summary>
		/// <param name="column"></param>
		/// <param name="columnName"></param>
		/// <param name="columnValue"></param>
		/// <param name="tableName"></param>
		/// <returns></returns>
		string ColumnValidateFail(DbColumn column, string columnName, object columnValue, string tableName);

		/// <summary>
		/// Column value exist
		/// </summary>
		/// <param name="column"></param>
		/// <param name="columnName"></param>
		/// <param name="columnValue"></param>
		/// <param name="tableName"></param>
		/// <returns></returns>
		string ColumnValueExist(DbColumn column, string columnName, object columnValue, string tableName);
		/// <summary>
		/// Columns value exist
		/// </summary>
		/// <param name="columns"></param>
		/// <param name="columnNames"></param>
		/// <param name="columnValues"></param>
		/// <param name="tableName"></param>
		/// <returns></returns>
		string ColumnValueExist(DbColumn[] columns, string[] columnNames, object[] columnValues, string tableName);

		/// <summary>
		/// Column max len reach
		/// </summary>
		/// <param name="column"></param>
		/// <param name="columnName"></param>
		/// <param name="columnValue"></param>
		/// <param name="tableName"></param>
		/// <returns></returns>
		string ColumnMaxLenReach(DbColumn column, string columnName, object columnValue, string tableName);
		/// <summary>
		/// Parent key not exist
		/// </summary>
		/// <param name="column"></param>
		/// <param name="columnName"></param>
		/// <param name="columnValue"></param>
		/// <param name="tableName"></param>
		/// <returns></returns>
		string ColumnValueNotExist(DbColumn column, string columnName, object columnValue, string tableName);
		/// <summary>
		/// Parent key not exist
		/// </summary>
		/// <param name="columns"></param>
		/// <param name="columnNames"></param>
		/// <param name="columnValues"></param>
		/// <param name="tableName"></param>
		/// <returns></returns>
		string ColumnValueNotExist(DbColumn[] columns, string[] columnNames, object[] columnValues, string tableName);

		/// <summary>
		/// Delete fail because trans exist in table
		/// </summary>
		/// <param name="columns"></param>
		/// <param name="columnNames"></param>
		/// <param name="columnValues"></param>
		/// <param name="tableName"></param>
		/// <returns></returns>
		string DeleteTransExist(DbColumn[] columns, string[] columnNames, object[] columnValues, string tableName);
		/// <summary>
		/// Delete fail because trans exist in table
		/// </summary>
		/// <param name="column"></param>
		/// <param name="columnName"></param>
		/// <param name="columnValue"></param>
		/// <param name="tableName"></param>
		/// <returns></returns>
		string DeleteTransExist(DbColumn column, string columnName, object columnValue, string tableName);
	}
}
